<?php if(count($this->files) > 0): ?>
<ul>
<?php foreach($this->files as $file): ?>
    <li>
        <?php
            $fileUrl = $this->baseUrl.str_replace(BP, '', $file['dirname']);
        ?>
        <div class="pic">
            <a href="javascript:void(0)">
                <img alt="<?php echo $file['basename'] ?>" title="<?php echo $file['basename'] ?>" src="<?php echo $fileUrl.'/'.$file['basename']?>" ondblclick="selectFile('<?php echo $fileUrl.'/'.$file['basename']?>')"/>
            </a>
        </div>
    </li>
<?php endforeach ?>
</ul>
<?php else: ?>
<p></p>
<?php endif; ?>